import service from '../network/service'

// 通过学校信息找回账号
export const getAccountBySchool = (data) => {
    return service({
        url: 'userCenter/user/verify/info',
        method: 'post',
        data: data
    })
};
/*
{
    "schoolId":12666,
    "classId":4,
    "realName":"杨前磊"
}
*/

// 通过订单编号找回账号
export const getAccountByOrder = (params) => {
    return service({
        url: '/userCenter/user/verify/billCode',
        method: 'post',
        params: params
    })
};
/*
    /userCenter/user/verify/billCode?billCode=123456
    url参数 billCode 订单号
*/

// 通过激活码找回账号
export const getAccountByKey = (params) => {
    return service({
        url: '/userCenter/user/verify/activeCode',
        method: 'post',
        params: params
    })
};
/*
    /userCenter/user/verify/activeCode?activeCode=123
    activeCode 激活码
*/

// 校验账号是否存在
export const checkAccount = (data) => {
    return service({
        url: '/user/checkExist',
        method: 'post',
        data: data
    })
};
/*
{
    "mobileAccount":"13145310973",
    "captchaToken":"a220813d-8827-49f8-af5c-e3dd78c45f99"
}
*/

// 校验是否绑定手机号
export const checkPhone = (data) => {
    return service({
        url: '/user/bindMobileStatus',
        method: 'post',
        data: data
    })
};
/*
{
    "mobileAccount":"13145310973",
    "captchaToken":"a47b036f-02bb-40c0-9ea9-345883abe188"
}
*/

// 找回密码--获取验证码
export const getPwdSmsCode = (params) => {
    return service({
        url: '/sms/byResetPass',
        method: 'post',
        params: params
    })
};

// 校验验证码
export const smsCodePwdExist = (data) => {
    return service({
        url: 'sms/validateSmsCodeStatus',
        method: 'post',
        data: data
    })
};

// 修改密码
export const resetPwd = (data) => {
    return service({
        url: '/userCenter/user/update/password/byResetPass',
        method: 'post',
        data: data
    })
};
/*
{
    "checkToken":"da633b65-d70f-463f-8bab-65ac569afae5",
    "newPassword":"a123456",
    "checkPassword":"a123456",
    "userId":"1"
}
*/